package Xue;

import java.util.Scanner;

import javax.swing.text.StyledEditorKit.ForegroundAction;

public class Lian {
	public static void main(String[] args) { 
		int[] arr = new int[5]; 
		String[] strs = {"一","二","三"}; 
		double[] scores = new double[] { 90, 88, 78, 90, 86, 95, 98, 72 }; 
		  int v=arr[2];//取值
		  String b=strs[2];
		  double d=scores[1];
		System.out.println(v);
		System.out.println(b);
		System.out.println(d);
		arr[0]=1;//赋值
		System.out.println(arr[0]);
		
		int[] arr1; 
		arr1= new int[]{1,2,3};
		int c=arr1[1];
		System.out.println(c);
		arr[1]=arr1[1]+1;
		System.out.println(arr[1]);
		
		/*Scanner sc=new Scanner(System.in);
		int[] arr2 = new int[5];
	    for (int s = 0; s < arr2.length; s++) {
	    	System.out.println("第"+(s+1)+"个学员成绩：");
			arr2[s]=sc.nextInt();
		}
		for (int j = 0; j < arr2.length; j++) {
			System.out.println(arr2[j]);
		}*/
		
		
		int[] arr3 = new int[] { 90, 88, 78, 90, 86, 95, 98, 72 };  
		int min=arr3[0];
		for (int j = 0; j < arr3.length; j++) {
			if (min>arr3[j]) {
				min=arr3[j];
			}
		}
		System.out.println(min);
		
		int[] arr4 = { 90, 88, 78, 86, 95, 98, 72 }; 
		for (int i = 0; i < arr4.length-1; i++) {
			for (int j = 0; j < arr4.length-1-i; j++) {
				if (arr4[j]<arr4[j+1]) {
					int temp=arr4[j];
					arr4[j]=arr4[j+1];
					arr4[j+1]=temp;
				}
			}
		}
		for (int j : arr4) {
			System.out.print(j+"\t");
		}
	}
}
